﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Tests.Integration.Instruments
{
    [TestClass]
    public class TestSession
    {
        public static string OriginalFxCopCmdPath { get; private set; }

        public static string OriginalMetricsPath { get; private set; }


        private TestSession()
        {
        }


        [AssemblyInitialize]
        public static void SetUpAssembly(TestContext context)
        {
            var package = PackageLoader.LoadPackage<FxCopIntegratorPackage>();
            OriginalFxCopCmdPath = package.GeneralOption.FxCopCmdPath;
            OriginalMetricsPath = package.GeneralOption.MetricsPath;
        }

        [AssemblyCleanup]
        public static void TearDownAssembly()
        {
            var package = PackageLoader.LoadPackage<FxCopIntegratorPackage>();
            package.GeneralOption.FxCopCmdPath = OriginalFxCopCmdPath;
            package.GeneralOption.MetricsPath = OriginalMetricsPath;
        }
    }
}
